package com.slz3.business.module.configManagement.conSiteCounty.steward;

import com.slz3.business.module.configManagement.conSiteCounty.domain.ConSiteCounty;
import com.slz3.business.module.configManagement.conSiteCounty.domain.ConSiteCountyCondition;
import org.springframework.web.reactive.function.server.ServerRequest;
import org.springframework.web.reactive.function.server.ServerResponse;
import reactor.core.publisher.Mono;

public class ConSiteCountyResponse {

    public static Mono<ServerResponse> add(ServerRequest req) {
        return req.bodyToMono(ConSiteCounty.class).flatMap(conSiteCounty ->
                ConSiteCountyResController.add(req, conSiteCounty)
        );
    }

    public static Mono<ServerResponse> delete(ServerRequest req) {
        return req.bodyToMono(ConSiteCountyCondition.class).flatMap(conSiteCountyCondition ->
                ConSiteCountyResController.delete(req, conSiteCountyCondition)
        );
    }

    public static Mono<ServerResponse> modify(ServerRequest req) {
        return req.bodyToMono(ConSiteCounty.class).flatMap(conSiteCounty ->
                ConSiteCountyResController.modify(req, conSiteCounty)
        );
    }


    public static Mono<ServerResponse> list(ServerRequest req) {
        return ConSiteCountyResController.list(req);
    }

    public static Mono<ServerResponse> info(ServerRequest req) {
        return ConSiteCountyResController.info(req);
    }

    public static Mono<ServerResponse> choice(ServerRequest req) {
        return ConSiteCountyResController.choice(req);
    }

    public static Mono<ServerResponse> auditSubmit(ServerRequest req) {
        return req.bodyToMono(ConSiteCountyCondition.class).flatMap(conSiteCountyCondition ->
                ConSiteCountyResController.auditSubmit(req, conSiteCountyCondition)
        );
    }

    public static Mono<ServerResponse> audit(ServerRequest req) {
        return req.bodyToMono(ConSiteCountyCondition.class).flatMap(conSiteCountyCondition ->
                ConSiteCountyResController.audit(req, conSiteCountyCondition)
        );
    }

    public static Mono<ServerResponse> auditReject(ServerRequest req) {
        return req.bodyToMono(ConSiteCountyCondition.class).flatMap(conSiteCountyCondition ->
                ConSiteCountyResController.auditReject(req, conSiteCountyCondition)
        );
    }

    public static Mono<ServerResponse> usingEnable(ServerRequest req) {
        return req.bodyToMono(ConSiteCountyCondition.class).flatMap(conSiteCountyCondition ->
                ConSiteCountyResController.usingEnable(req, conSiteCountyCondition)
        );
    }

    public static Mono<ServerResponse> usingDisable(ServerRequest req) {
        return req.bodyToMono(ConSiteCountyCondition.class).flatMap(conSiteCountyCondition ->
                ConSiteCountyResController.usingDisable(req, conSiteCountyCondition)
        );
    }   

}
